 * {
            box-sizing: border-box;
            margin: 0;
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
        }
        body {
            background: #eef2f6;
            display: flex;
            justify-content: center;
            padding: 1.5rem;
            min-height: 100vh;
        }
        .app-container {
            max-width: 1600px;
            width: 100%;
            background: white;
            border-radius: 2rem;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .header {
            background: #ffffffea;
            backdrop-filter: blur(8px);
            padding: 1.2rem 2rem;
            border-bottom: 1px solid #e9eef2;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }
        .logo h1 {
            font-size: 1.8rem;
            font-weight: 700; 
            letter-spacing: -0.02em;
        }
        .logo small {
            font-size: 0.8rem;
            background: #eef5ff;
            color: #1e4a8b;
            padding: 0.2rem 0.8rem;
            border-radius: 40px;
            margin-left: 1rem;
            font-weight: 500;
        }
        .badge {
            background: #dcfce7;
            color: #166534;
            font-size: 0.75rem;
            padding: 0.2rem 0.6rem;
            border-radius: 40px;
        }
        .main-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.2rem;
            padding: 1.8rem;
            background: #f9fbfd;
            flex: 1;
        }
        /* left panel – database input */
        .db-panel {
            background: white;
            border-radius: 1.5rem;
            padding: 1.5rem;
            box-shadow: 0 8px 20px -8px rgba(0,0,0,0.08);
            border: 1px solid #eef2f6;
            display: flex;
            flex-direction: column;
        }
        .db-panel h3 {
            font-size: 1rem;
            text-transform: uppercase;
            color: #64748b;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .db-textarea {
            width: 100%;
            height: 250px;
            padding: 1rem;
            border: 1px solid #cbd5e1;
            border-radius: 20px;
            font-family: 'Monaco', 'Menlo', monospace;
            font-size: 0.9rem;
            resize: vertical;
            margin-bottom: 1rem;
        }
        .db-controls {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }
        .btn {
            background: white;
            border: 1px solid #cbd5e1;
            padding: 0.7rem 1.2rem;
            border-radius: 40px;
            font-weight: 600;
            font-size: 0.9rem;
            color: #1e293b;
            cursor: pointer;
            transition: 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .btn-primary {
            background: #1b4a8b;
            border-color: #0f2b4f;
            color: white;
        }
        .btn-primary:hover {
            background: #0f3a6b;
        }
        .btn:hover {
            background: #f1f5f9;
            transform: translateY(-2px);
        }
        .db-info {
            font-size: 0.85rem;
            color: #475569;
            background: #f8fafc;
            padding: 0.8rem 1rem;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
        }
        .db-info span {
            font-weight: 700;
            color: #1b4a8b;
        }
        /* right panel – tabs */
        .right-panel {
            background: white;
            border-radius: 1.5rem;
            box-shadow: 0 8px 20px -8px rgba(0,0,0,0.08);
            border: 1px solid #eef2f6;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .tab-header {
            display: flex;
            border-bottom: 1px solid #e9eef2;
        }
        .tab {
            flex: 1;
            text-align: center;
            padding: 1rem;
            font-weight: 600;
            color: #64748b;
            cursor: pointer;
            transition: 0.1s;
        }
        .tab.active {
            color: #1b4a8b;
            border-bottom: 3px solid #1b4a8b;
        }
        .tab-content {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
            max-height: 70vh;
        }
        .tab-pane {
            display: none;
        }
        .tab-pane.active {
            display: block;
        }
        /* chat pane */
        .chat-messages {
            height: 300px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
            margin-bottom: 1rem;
            padding-right: 0.5rem;
        }
        .message {
            padding: 0.8rem 1rem;
            border-radius: 20px;
            max-width: 80%;
            word-wrap: break-word;
        }
        .user-message {
            background: #1b4a8b;
            color: white;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
        }
        .bot-message {
            background: #f1f5f9;
            color: #1e293b;
            align-self: flex-start;
            border-bottom-left-radius: 4px;
        }
        .chat-input-area {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        .chat-input {
            flex: 1;
            padding: 0.8rem 1.2rem;
            border: 1px solid #cbd5e1;
            border-radius: 40px;
            font-size: 0.95rem;
        }
        .chat-send {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: #1b4a8b;
            color: white;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }
        /* examples */
        .examples-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            color: #1b4a8b;
            font-weight: 600;
            margin-top: 1rem;
        }
        .examples-header i {
            transition: transform 0.2s;
        }
        .examples-header.open i {
            transform: rotate(90deg);
        }
        .examples-grid {
            display: none;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 0.5rem;
            margin-top: 1rem;
            max-height: 200px;
            overflow-y: auto;
        }
        .examples-grid.open {
            display: grid;
        }
        .example-chip {
            background: #f1f5f9;
            border: 1px solid #cbd5e1;
            border-radius: 40px;
            padding: 0.4rem 0.8rem;
            font-size: 0.8rem;
            cursor: pointer;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .example-chip:hover {
            background: #e2e8f0;
        }
        /* table pane */
        .table-controls {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }
        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }
        .data-table th {
            background: #f1f5f9;
            padding: 0.5rem;
            text-align: left;
            font-weight: 600;
            position: sticky;
            top: 0;
        }
        .data-table td {
            padding: 0.5rem;
            border-bottom: 1px solid #e9eef2;
        }
        .empty-table {
            color: #94a3b8;
            text-align: center;
            padding: 2rem;
            font-style: italic;
        }
        footer {
            padding: 0.8rem 2rem;
            border-top: 1px solid #e9eef2;
            color: #6b7a8f;
            font-size: 0.9rem;
            display: flex;
            justify-content: space-between;
            background: white;
        }
        #fileInput {
            display: none;
        }